package com.wjb.xietong.server.login;

import java.util.HashMap;
import java.util.Map;

import com.wjb.xietong.server.IRequestParam;
import com.wjb.xietong.util.IDs;

public class LoginParam implements IRequestParam {
	private String userName = null;
	private String userPwd = null;
	private String clientId = null;//个推clientId

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPwd() {
		return userPwd;
	}

	public void setUserPwd(String userPwd) {
		this.userPwd = userPwd;
	}
	
	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	@Override
	public Map<String, String> parseData2Map() {
		Map<String, String> map = new HashMap<String, String>();
		put(map, IDs.M, IDs.MOBILE_LOGIN);
		put(map, IDs.USER_NAME, getUserName());
		put(map, IDs.PASSWORD, getUserPwd());
		put(map, IDs.CLIENT_ID, getClientId());
		return map;
	}

	private void put(Map<String, String> map, String key, String value) {
		if (null == key || null == value) {
			return;
		}
		map.put(key, value);
	}

}
